<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>管理后台</title>
    <link rel="stylesheet" href="/static/lib/layui/css/layui.css">
    {block name="css"}{/block}
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    

    <div class="">
        <fieldset class="layui-elem-field">
            <legend>非法操作</legend>
            <div class="layui-field-box">
                你没有权限执行此操作！
            </div>
        </fieldset>
    </div>
</div>

<script src="/static/lib/layui/layui.js"></script>
<script>
    layui.use(['layer', 'element'], function () {
        var layer = layui.layer;
        var $ = layui.jquery;
        var is_open = 0;
        // 折叠打开菜单
        $("#open_menu").click(function () {
            if (is_open) {
                $("#menu .layui-nav-item").removeClass("layui-nav-itemed");
                is_open = 0;
            } else {
                $("#menu .layui-nav-item").addClass("layui-nav-itemed");
                is_open = 1;
            }
            return false;
        });

        // 清除缓存
        $("#clear_cache").click(function () {
            $.ajax({
                url: "{:url('admin/login/clearCache')}",
                type: "post",
                dataType: "json",
                success: function (ret) {
                    layer.msg(ret.msg);
                }
            });
            return false;
        });

        // 注销登录
        $("#logout").click(function () {
            $.ajax({
                url: "{:url('admin/login/logout')}",
                type: "post",
                dataType: "json",
                success: function (ret) {
                    layer.msg(ret.msg, {time: 2000}, function () {
                        location.href = "{:url('admin/login/login')}";
                    });
                }
            });
            return false;
        });
    });
</script>
</body>
</html>